<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <style>
        body {
            background-color: #f8f8f8;
        }

        .center {
            width: 100%;
            height: 8rem;
            background: #eee;
            position: relative;
            text-align: center;
            background-image: url(../image/bg01.png);
            background-size: cover;
            background-repeat: no-repeat;
        }

        .avatar {
            width: 3rem;
            border-radius: 50%;
            display: inline-block;
            margin-top: 1.5rem;
        }

        .username {
            font-size: 1rem;
            margin-top: 0.5rem;
            color: #ffffff;
        }
    </style>
</head>

<body>
    <header class="aui-bar aui-bar-nav" style="padding-top:25px">
        <a class="aui-pull-left" onclick="api.closeWin();">返回</a>
        <div class="aui-title">商家管理</div>
    </header>
    <div class="vue">
        <div class="center">
            <img class="avatar" src="../image/logo.png">
            <div class="username">{{user.user_name}}</div>
        </div>
        <ul class="aui-list">
            <li class="aui-list-item aui-list-item-middle" @click="business">
                <div class="aui-list-item-inner aui-list-item-arrow">
                    <div class="aui-list-item-title">设置旺旺币</div>
                </div>
            </li>
            <li class="aui-list-item aui-list-item-middle" @click="jpush">
                <div class="aui-list-item-inner aui-list-item-arrow">
                    <div class="aui-list-item-title">推送消息</div>
                </div>
            </li>
            <li class="aui-list-item aui-list-item-middle" @click="store">
                <div class="aui-list-item-inner aui-list-item-arrow">
                    <div class="aui-list-item-title">{{user.type_name}}管理</div>
                </div>
            </li>
        </ul>
    </div>

    <script type="text/javascript" src="../script/vue.js"></script>
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/app.js"></script>
    <script type="text/javascript">
        apiready = function() {
            var user = app.getUser();
            var Ve = new Vue({
                el: '.vue',
                data: {
                    user: user
                },
                methods: {
                    business: function() {
                        api.openWin({
                            name: 'business_setting',
                            url: 'business_setting.html'
                        });
                    },
                    jpush: function() {
                        api.openWin({
                            name: 'jpush_setting',
                            url: 'jpush_setting.html'
                        });
                    },
                    store: function() {
                        api.openWin({
                            name: 'store_setting',
                            url: 'store_setting.html',
                            pageParam: user
                        });
                    }
                }
            })

        }
    </script>
</body>

</html>
